{template 'member', 'header'}
<div id="memberArea">
	{template 'member', 'account_manage_left'}
	<div class="col-auto">
		<div class="col-1 ">
			<h5 class="title">{L('modify').L('avatar')}</h5>
			<div class="content">
				{if !$avatarhtml}
                <script language="javascript" type="text/javascript" src="{JS_PATH}swfobject.js"></script>
                <script type="text/javascript">
                    var flashvars = {
                        'upurl':"{$upurl}&callback=return_avatar"
                    }; 
                    var params = {
                        'align':'middle',
                        'play':'true',
                        'loop':'false',
                        'scale':'showall',
                        'wmode':'window',
                        'devicefont':'true',
                        'id':'Main',
                        'bgcolor':'#ffffff',
                        'name':'Main',
                        'allowscriptaccess':'always'
                    }; 
                    var attributes = {
                        
                    }; 
                    swfobject.embedSWF("{IMG_PATH}main.swf", "myContent", "490", "434", "9.0.0","{IMG_PATH}expressInstall.swf", flashvars, params, attributes);

                    function return_avatar(data) {
                        if(data == 1) {
                            window.location.reload();
                        } else {
                            alert('failure');
                        }
                    }
                </script>
                {/if}  
				<ul class="col-right col-avatar" id="avatarlist">
				  {loop $avatar $k $v}
					<li>
						<img src="{$v}" height="{$k}" width="{$k}" onerror="this.src='{IMG_PATH}member/nophoto.gif'"><br />
						{L('avatar')}{$k} x {$k}
					</li>
				  {/loop}
				</ul>
				<div class="col-auto">
					<div id="myContent"> 
					  {if !$avatarhtml}<p>Alternative content</p>{else}<script type="text/javascript">function updateavatar() {window.location.reload();}</script>{$avatarhtml}{/if}
					</div>
				</div>
			</div>
			<span class="o1"></span><span class="o2"></span><span class="o3"></span><span class="o4"></span>
		</div>
	</div>
</div>
<div class="clear"></div>
{template 'member', 'footer'}